package com.kaka.mapper;

import com.kaka.pojo.Product;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ProductMapper {

    List<Product> selectAll(String productName);

    @Select("select * from product where id = #{id}")
    Product selectById(Integer id);

    void updateProduct(Product product);

    void insertProduct(Product product);

    @Delete("delete from product where id = #{id}")
    void deleteProductById(Integer id);

    void deleteProductByIds(List<Integer> ids);

    Product selectByOid(Integer oid);
}